package com.docker.ywx.service.impl;

import java.util.List;
import com.docker.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.docker.ywx.mapper.DoctorMedicalrecordMapper;
import com.docker.ywx.domain.DoctorMedicalrecord;
import com.docker.ywx.service.IDoctorMedicalrecordService;

/**
 * 病历模版Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-09
 */
@Service
public class DoctorMedicalrecordServiceImpl implements IDoctorMedicalrecordService 
{
    @Autowired
    private DoctorMedicalrecordMapper doctorMedicalrecordMapper;

    /**
     * 查询病历模版
     * 
     * @param id 病历模版主键
     * @return 病历模版
     */
    @Override
    public DoctorMedicalrecord selectDoctorMedicalrecordById(Long id)
    {
        return doctorMedicalrecordMapper.selectDoctorMedicalrecordById(id);
    }

    /**
     * 查询病历模版列表
     * 
     * @param doctorMedicalrecord 病历模版
     * @return 病历模版
     */
    @Override
    public List<DoctorMedicalrecord> selectDoctorMedicalrecordList(DoctorMedicalrecord doctorMedicalrecord)
    {
        return doctorMedicalrecordMapper.selectDoctorMedicalrecordList(doctorMedicalrecord);
    }

    /**
     * 新增病历模版
     * 
     * @param doctorMedicalrecord 病历模版
     * @return 结果
     */
    @Override
    public int insertDoctorMedicalrecord(DoctorMedicalrecord doctorMedicalrecord)
    {
        doctorMedicalrecord.setCreateTime(DateUtils.getNowDate());
        return doctorMedicalrecordMapper.insertDoctorMedicalrecord(doctorMedicalrecord);
    }

    /**
     * 修改病历模版
     * 
     * @param doctorMedicalrecord 病历模版
     * @return 结果
     */
    @Override
    public int updateDoctorMedicalrecord(DoctorMedicalrecord doctorMedicalrecord)
    {
        return doctorMedicalrecordMapper.updateDoctorMedicalrecord(doctorMedicalrecord);
    }

    /**
     * 批量删除病历模版
     * 
     * @param ids 需要删除的病历模版主键
     * @return 结果
     */
    @Override
    public int deleteDoctorMedicalrecordByIds(Long[] ids)
    {
        return doctorMedicalrecordMapper.deleteDoctorMedicalrecordByIds(ids);
    }

    /**
     * 删除病历模版信息
     * 
     * @param id 病历模版主键
     * @return 结果
     */
    @Override
    public int deleteDoctorMedicalrecordById(Long id)
    {
        return doctorMedicalrecordMapper.deleteDoctorMedicalrecordById(id);
    }
}
